package cn.lingyangwl.agile.infra.dict.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.lingyangwl.agile.file.excel.ExcelUnique;
import cn.lingyangwl.agile.model.ExcelBaseModel;
import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.agile.model.module.dict.DictTypeCons;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 字典类型表 sys_dict_type
 * 
 * @author shenguangyang
 */
@Getter
@Setter
@ToString
public class DictExcel extends ExcelBaseModel {
    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Long id;

    @ExcelIgnore
    private Long groupId;

    /**
     * 字典名称
     */
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    @Excel(name = "字典名称", orderNum = "1", width = 25)
    @Size(min = 1, max = 100, message = "字典名称长度不能超过100个字符")
    private String dictName;

    /**
     * 字典编码
     */
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    @Excel(name = "字典编码", orderNum = "5", width = 25)
    @Size(min = 1, max = 100, message = "字典编码长度不能超过100个字符")
    @ExcelUnique
    private String dictCode;

    /**
     * 字典组
     */
    @Excel(name = "字典组", orderNum = "10", width = 16)
    private String groupName;

    /**
     * 状态（1正常 2停用）
     */
    @Excel(name = "状态", dict = DictTypeCons.DICT_ITEM_STATUS, addressList = true, orderNum = "15", width = 16)
    private String status;
}
